package cn.gson.springboot.controller;

import cn.gson.springboot.model.pojos.Contract;
import cn.gson.springboot.model.service.ContractViewService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import javax.servlet.http.HttpSession;

@Controller
public class ContractViewController {
    @Autowired
    ContractViewService contractViewService;

    @RequestMapping("emp-contract-id")
    @ResponseBody
    public Contract EmpContractList(Integer contractId, HttpSession session){
        //Employee emp = (Employee) session.getAttribute("emp");
        Contract contract = contractViewService.selectEmpContractById(contractId);
        return contract;
    }
}
